package com.cn.esermis.dpld.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cn.esermis.dpld.entity.DataAcquisitionInstrument;
import com.cn.esermis.dpld.model.CompanyInfo;
import com.cn.esermis.dpld.model.DataAcquisitionInstrumentVo;
import com.cn.esermis.dpld.model.Department;
import com.cn.esermis.dpld.model.OutletAndFactorVo;
import com.cn.esermis.model.ComponyData;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface DataAcquisitionInstrumentMapper extends BaseMapper<DataAcquisitionInstrument> {

    List<OutletAndFactorVo> selectListAll();

    List<ComponyData> getCompony();

    List<Map<String, Object>> getDepartment(String componyid);

    @MapKey("companyid")
    Map<String, Object> getComponyMap();

    @MapKey("departmentid")
    Map<String, Object> getDepartmentMap();

    List<DataAcquisitionInstrument> listByCode(DataAcquisitionInstrumentVo vo);

    Boolean verifydepartmen(String factoryId);

    String verifyCompany(String companyId);

    List<String> getComponyList(String companyName, String companyId);

    List<String> getComponyListAll(@Param("companyName") String companyName);

    List<Department> getDepartmentDit();

    CompanyInfo getCompanyInfo(@Param("companyCode") String companyCode, @Param("departmentCode") String departmentCode);
}
